package com.example.microserviceconsumersample;

import com.example.microserviceapi.service.FeignDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p> Demo </p>
 *
 * @author Chris
 * @since 2022/11/15 16:49
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private FeignDemoService feignDemoService;

    @GetMapping("/hello")
    public String sayHello(String name) {
        return feignDemoService.sayHello(name);
    }

}